#include "widget.h"
#include "ui_widget.h"
#include"QString"
#include"QDebug"
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->comboBox->addItem("香辣鸡腿堡");
    ui->comboBox->addItem("安格斯牛肉堡");
    ui->comboBox->addItem("蟹黄堡");
    ui->spinBox->setSingleStep(1);
    ui->spinBox->setMaximum(5);
    ui->spinBox->setMinimum(0);
    ui->spinBox_2->setSingleStep(1);
    ui->spinBox_2->setMaximum(5);
    ui->spinBox_2->setMinimum(0);
    ui->spinBox_3->setSingleStep(1);
    ui->spinBox_3->setMaximum(5);
    ui->spinBox_3->setMinimum(0);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    QString content="你选择的食物：";
    content+=ui->comboBox->currentText()+ui->spinBox->value()+QString("份");
    content+=ui->comboBox_2->currentText()+ui->spinBox_2->value()+QString("份");
    content+=ui->comboBox_3->currentText()+ui->spinBox_3->value()+QString("份");
    qDebug()<<content;

}
